package com.zc.timedown.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.zc.common.annotation.Excel;
import com.zc.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.time.LocalDate;

/**
 * 每日一句对象 daily_quote
 * 
 * @author zc
 * @date 2025-09-29
 */
public class DailyQuote extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 内容 */
    @Excel(name = "内容")
    private String content;

    /** 作者 */
    @Excel(name = "作者")
    private String author;

    /** 出处（书籍、电影等） */
    @Excel(name = "出处", readConverterExp = "书=籍、电影等")
    private String source;

    /** 发布日期（用于区分哪天的内容） */
    @Excel(name = "发布日期", readConverterExp = "用=于区分哪天的内容")
    private LocalDate publishDate;

    /** 是否公开显示（0否，1是） */
    @Excel(name = "是否公开显示", readConverterExp = "0=否，1是")
    private Integer isPublic;

    /** 是否自创（0否，1是） */
    private Integer isSelfCreated;

    /** 用户ID */
    private Long userId;



    /**
     * 是否收藏标识（非数据库字段）
     */
    @TableField(exist = false)
    private Boolean favorite = false;

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setIsSelfCreated(Integer isSelfCreated) {
        this.isSelfCreated = isSelfCreated;
    }

    public Integer getIsSelfCreated() {
        return isSelfCreated;
    }

    public void setFavorite(Boolean favorite) {
        this.favorite = favorite;
    }

    public Boolean getFavorite() {
        return favorite;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setAuthor(String author) 
    {
        this.author = author;
    }

    public String getAuthor() 
    {
        return author;
    }

    public void setSource(String source) 
    {
        this.source = source;
    }

    public String getSource() 
    {
        return source;
    }

    public void setPublishDate(LocalDate publishDate)
    {
        this.publishDate = publishDate;
    }

    public LocalDate getPublishDate()
    {
        return publishDate;
    }

    public void setIsPublic(Integer isPublic) 
    {
        this.isPublic = isPublic;
    }

    public Integer getIsPublic() 
    {
        return isPublic;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("content", getContent())
            .append("author", getAuthor())
            .append("source", getSource())
            .append("publishDate", getPublishDate())
            .append("isPublic", getIsPublic())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
